using DesktopWidgetApp.Shared;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace DesktopWidgetApp.Core.Data
{
    /// <summary>
    /// 状态变更历史仓储接口
    /// </summary>
    public interface IStatusChangeHistoryRepository : IRepository<StatusChangeHistory>
    {
        /// <summary>
        /// 获取指定用户的状态变更历史
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="limit">获取的记录数量限制</param>
        /// <returns>状态变更历史记录列表</returns>
        Task<IEnumerable<StatusChangeHistory>> GetByUserIdAsync(Guid userId, int limit = 50);

        /// <summary>
        /// 获取指定状态的变更历史
        /// </summary>
        /// <param name="statusId">状态ID</param>
        /// <returns>状态变更历史记录列表</returns>
        Task<IEnumerable<StatusChangeHistory>> GetByStatusIdAsync(Guid statusId);

        /// <summary>
        /// 获取指定时间范围内的状态变更历史
        /// </summary>
        /// <param name="startTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <returns>状态变更历史记录列表</returns>
        Task<IEnumerable<StatusChangeHistory>> GetByTimeRangeAsync(DateTime startTime, DateTime endTime);
    }
}